<h1>Ads List</h1>

<table>
  <thead>
    <tr>
      <th>Id</th>
      <th>Course</th>
      <th>Textbook</th>
      <th>Price</th>
      <th>Seller</th>
      <th>Contact</th>
      <th>Email</th>
      <th>Created at</th>
      <th>Updated at</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($ads as $ad): ?>
    <tr>
      <td><a href="<?php echo url_for('ad/show?id='.$ad->getId()) ?>"><?php echo $ad->getId() ?></a></td>
      <td><?php echo $ad->getCourseId() ?></td>
      <td><?php echo $ad->getTextbookId() ?></td>
      <td><?php echo $ad->getPrice() ?></td>
      <td><?php echo $ad->getSeller() ?></td>
      <td><?php echo $ad->getContact() ?></td>
      <td><?php echo $ad->getEmail() ?></td>
      <td><?php echo $ad->getCreatedAt() ?></td>
      <td><?php echo $ad->getUpdatedAt() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('ad/new') ?>">New</a>
